#include "const.h"

size_t i_strcat(char *buf, size_t bufn, const char *src) {
	size_t index, len;

	index = strlen(buf);
	len = strlen(src);

	if (index+len >= bufn)
		i_interror("detected overflow");

	memcpy((void *)&buf[index], (const void *)src, len+1);
	return index+len;
}
